package cn.deschen.biz.domain.entity;

import cn.deschen.common.config.security.UserDetails;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 后台用户
 * </p>
 *
 * @author deschen
 * @since 2021-06-02
 */
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value="CmUser对象", description="后台用户")
public class CmUser extends BaseEntity implements UserDetails {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "用户名")
    private String userName;

    @ApiModelProperty(value = "姓名")
    private String cnName;

    @ApiModelProperty(value = "密码")
    private String password;

    @ApiModelProperty(value = "头像")
    private String icon;

    @ApiModelProperty(value = "手机号")
    private String mobile;

    @ApiModelProperty(value = "账号状态 （normal-正常 stop-停用）")
    private String accountStatus;

    @Override
    public String getUsername() {
        return userName;
    }

    @Override
    public boolean isEnabled() {
        return true;
    }
}
